package com.wicket.okrapp.integration.dto;

import com.wicket.okrapp.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

import lombok.Data;

/**
 * @desc WorkContStakeholderDto
 * @使用场景
 */
@Data
public class WorkContStakeholderDto extends BaseDto implements Serializable {

  /**
   * 虚拟组织成员ID
   */
  @ApiModelProperty("虚拟组织成员ID")
  private String virtualOrgMemberId;

  /**
   * 虚拟组织成员就职记录ID
   */
  @ApiModelProperty("虚拟组织成员就职记录ID")
  private String virtualOrgInductionRecordId;

  /**
   * 身份人员ID
   */
  @ApiModelProperty("身份人员ID")
  private String originalRoleMemberId;

  /**
   * 个人账号
   */
  @ApiModelProperty("个人账号")
  private String userId;

  /**
   * 真实头像
   */
  @ApiModelProperty("真实头像")
  private String userFace;

  /**
   * 真实姓名
   */
  @ApiModelProperty("真实姓名")
  private String idCardName;

  /**
   * 用户昵称
   */
  @ApiModelProperty("用户昵称")
  private String nickName;

  /**
   * 角色标识
   */
  @ApiModelProperty("角色标识")
  private String roleCode;

  /**
   * 组内职务名称
   */
  @ApiModelProperty("组内职务名称")
  private String virtualOrganizationPosition;

  /**
   * 就职开始时间
   */
  @ApiModelProperty("就职开始时间")
  private Date inductionStartTime;

  /**
   * 是否管理员 TRUE:是 FALSE:否
   */
  @ApiModelProperty("是否管理员")
  private String isAdmin;

  /**
   * 主体生命周期 CURRENTLY_VALID:当前有效 EDITING:正在编辑 ARCHIVING:历史存档
   */
  @ApiModelProperty("主体生命周期")
  private String subjectLifeCycle;

  /**
   * 排序
   */
  @ApiModelProperty("排序")
  private Long orderNumber;

  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    if (!super.equals(o)) return false;
    WorkContStakeholderDto that = (WorkContStakeholderDto) o;
    return (
      virtualOrgMemberId == that.virtualOrgMemberId &&
      virtualOrgInductionRecordId == that.virtualOrgInductionRecordId &&
      originalRoleMemberId == that.originalRoleMemberId &&
      userId == that.userId &&
      userFace == that.userFace &&
      idCardName == that.idCardName &&
      nickName == that.nickName &&
      roleCode == that.roleCode &&
      virtualOrganizationPosition == that.virtualOrganizationPosition &&
      inductionStartTime == that.inductionStartTime &&
      isAdmin == that.isAdmin &&
      subjectLifeCycle == that.subjectLifeCycle &&
      orderNumber == that.orderNumber
    );
  }

  @Override
  public int hashCode() {
    return Objects.hash(
      super.hashCode(),
      virtualOrgMemberId,
      virtualOrgInductionRecordId,
      originalRoleMemberId,
      userId,
      userFace,
      idCardName,
      nickName,
      roleCode,
      virtualOrganizationPosition,
      inductionStartTime,
      isAdmin,
      subjectLifeCycle,
      orderNumber
    );
  }

}
